import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      redirect: "/home",
    },
    {
      path: "/home",
      name: "home",
      component: () => import("@/views/HomeView.vue"),
    },
    {
      path: "/my",
      name: "my",
      component: () => import("@/views/MyView.vue"),
    },
    {
      path: "/scanCode",
      name: "scanCode",
      component: () => import("@/views/ScanCodeView.vue"),
    },
    {
      path: "/scanResult",
      name: "scanResult",
      component: () => import("@/views/ScanResultView.vue"),
    },
    {
      path: "/scanLog",
      name: "scanLog",
      component: () => import("@/views/ScanLogView.vue"),
    },
    {
      path: "/login",
      name: "login",
      component: () => import("@/views/loginView.vue"),
    },
    {
      path: "/passwork",
      name: "passwork",
      component: () => import("@/views/PassworkView.vue"),
    },
  ],
});

export default router;
